<!-- Content Header (Page header) -->
<section class="content-header">
  <h1>
          ZooKeeper配置
  </h1>
  <ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i>ZooKeeper配置</a></li>
    <li><a href="#"><i class="fa fa-table"></i>Procedure</a></li>
    <li class="active">新增cluster</li>
  </ol>
</section>
<!-- Main content -->
<section id="container" class="content">
  <div class="row">
	 <div class="col-md-12">
	      <div class="box box-primary">
	        <div class="box-header with-border">
	          <h3 class="box-title">cluster配置</h3>
	          <div class="box-tools pull-right">
                  <button id="abc" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
               </div>
	        </div>
	        
	        <form action="" id="add_form">
		        <div class="box-body">
		          <div class="row">
		             <div class="col-xs-6">
						<div class="form-group">
			              <input type=hidden id="zkid" name="zkid"  />
		                     <label for="text">名称:</label>
			                  <input id="mycatName" type="text" name="name" class="form-control"  validateType = "lengthRange-1-20|excludeCN"  placeholder="名称">
		                  </div>

		                  <div class="form-group">
		                     <label for="server">说明:</label>
			                  <input id="dbName" type="text" name="memo" class="form-control" placeholder="说明" validateType="lengthRange-1-100">
		                  </div>
                  
		             </div>
		            </div> 
		        </div>
	        </form>
	        
	        
	        <div class="box-footer">
	         <div class="form-group">
	            <button class="btn btn-primary" onclick="addForm('zkConfigService','insertCluster','add_form','addForm_extra_call')">保存</button>
	            <button class="btn btn-primary" onclick="loadContext('page/manger/zkconfig.html')">返回列表</button>
			</div>
	     </div>
	   </div>
	 </div>
 </div>
</section><!-- /.content -->
<script type="text/javascript">
	$.AdminLTE.boxWidget.activate();
   function addForm_extra_call(_formid,data){
	   var value_obj = {};
	   value_obj.url = data.url;
	   value_obj.driverClassName = data.driverClassName;
	   value_obj.username = data.username;
	   value_obj.password = data.password;
	   data.value = JSON.stringify(value_obj);
   }

   $(document).ready(function(){
	   	ready4AddForm("ready4Update_extra_call");
   });
</script>